(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

f(x, y, z) → g(<=(x, y), x, y, z)
g(true, x, y, z) → z
g(false, x, y, z) → f(f(p(x), y, z), f(p(y), z, x), f(p(z), x, y))
p(0) → 0
p(s(x)) → x

Rewrite Strategy: INNERMOST

(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted CpxTRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

f(z0, z1, z2) → g(<=(z0, z1), z0, z1, z2)
g(true, z0, z1, z2) → z2
g(false, z0, z1, z2) → f(f(p(z0), z1, z2), f(p(z1), z2, z0), f(p(z2), z0, z1))
p(0) → 0
p(s(z0)) → z0
Tuples:

F(z0, z1, z2) → c(G(<=(z0, z1), z0, z1, z2))
G(false, z0, z1, z2) → c2(F(f(p(z0), z1, z2), f(p(z1), z2, z0), f(p(z2), z0, z1)), F(p(z0), z1, z2), P(z0), F(p(z1), z2, z0), P(z1), F(p(z2), z0, z1), P(z2))
S tuples:

F(z0, z1, z2) → c(G(<=(z0, z1), z0, z1, z2))
G(false, z0, z1, z2) → c2(F(f(p(z0), z1, z2), f(p(z1), z2, z0), f(p(z2), z0, z1)), F(p(z0), z1, z2), P(z0), F(p(z1), z2, z0), P(z1), F(p(z2), z0, z1), P(z2))
K tuples:none
Defined Rule Symbols:

f, g, p

Defined Pair Symbols:

F, G

Compound Symbols:

c, c2

(3) CdtGraphRemoveDanglingProof (ComplexityIfPolyImplication transformation)

Removed 2 of 2 dangling nodes:

F(z0, z1, z2) → c(G(<=(z0, z1), z0, z1, z2))
G(false, z0, z1, z2) → c2(F(f(p(z0), z1, z2), f(p(z1), z2, z0), f(p(z2), z0, z1)), F(p(z0), z1, z2), P(z0), F(p(z1), z2, z0), P(z1), F(p(z2), z0, z1), P(z2))

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

f(z0, z1, z2) → g(<=(z0, z1), z0, z1, z2)
g(true, z0, z1, z2) → z2
g(false, z0, z1, z2) → f(f(p(z0), z1, z2), f(p(z1), z2, z0), f(p(z2), z0, z1))
p(0) → 0
p(s(z0)) → z0
Tuples:none
S tuples:none
K tuples:none
Defined Rule Symbols:

f, g, p

Defined Pair Symbols:none

Compound Symbols:none

(5) SIsEmptyProof (EQUIVALENT transformation)

The set S is empty

(6) BOUNDS(O(1), O(1))